
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>Introduction to atomman: Load and dump conversions &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Introduction to atomman: system_model conversions" href="1.4.1._system_model_conversions.html" />
    <link rel="prev" title="Introduction to atomman: System class" href="1.3._System_class.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="1.4.1._system_model_conversions.html" title="Introduction to atomman: system_model conversions"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="1.3._System_class.html" title="Introduction to atomman: System class"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="Introduction-to-atomman:-Load-and-dump-conversions">
<h1>Introduction to atomman: Load and dump conversions<a class="headerlink" href="#Introduction-to-atomman:-Load-and-dump-conversions" title="Permalink to this headline">¶</a></h1>
<p><strong>Lucas M. Hale</strong>, <a class="reference external" href="mailto:lucas&#46;hale&#37;&#52;&#48;nist&#46;gov?Subject=ipr-demo">lucas<span>&#46;</span>hale<span>&#64;</span>nist<span>&#46;</span>gov</a>, <em>Materials Science and Engineering Division, NIST</em>.</p>
<p><a class="reference external" href="http://www.nist.gov/public_affairs/disclaimer.cfm">Disclaimers</a></p>
<div class="section" id="1.-Introduction">
<h2>1. Introduction<a class="headerlink" href="#1.-Introduction" title="Permalink to this headline">¶</a></h2>
<p>Atomman features an number of built-in converters between the atomman.System class and other representations of atomic configurations. This includes text-based representations for storing atomic information as files, and representations used by other Python packages. All conversions between the different format options are handled in a similar manner by defining the two operations</p>
<ul class="simple">
<li><p><strong>load</strong> creates a System object based on another representation.</p></li>
<li><p><strong>dump</strong> converts a System object to another representation.</p></li>
</ul>
<p><strong>NOTE</strong>: Some of the load/dump styles have additional Python package requirements in order to work. Check the documentation on each style for more details.</p>
</div>
<div class="section" id="2.-Load">
<h2>2. Load<a class="headerlink" href="#2.-Load" title="Permalink to this headline">¶</a></h2>
<p>Each style defines its own load function, which can be called directly as atomman.load_&lt;style&gt;(), (e.g. atomman.load_poscar()) or by calling atomman.load(style). The underlying code for the load functions can be found in the atomman/load directory.</p>
<div class="section" id="2.1.-atomman.load_&lt;style&gt;()">
<h3>2.1. atomman.load_&lt;style&gt;()<a class="headerlink" href="#2.1.-atomman.load_<style>()" title="Permalink to this headline">¶</a></h3>
<p>Style-specific load functions.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>content</strong> (<em>any</em>) the content to be loaded. For text formats, can be a str of the content, a file path or a file-like object.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) any extra style-specific keyword arguments.</p></li>
</ul>
</div>
<div class="section" id="2.2.-atomman.load()">
<h3>2.2. atomman.load()<a class="headerlink" href="#2.2.-atomman.load()" title="Permalink to this headline">¶</a></h3>
<p>Common load function that can be used for any style. Convenient for loading user-specified data as the format style is a string parameter.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>style</strong> (<em>str</em>) indicates the format of the content being loaded.</p></li>
<li><p><strong>content</strong> (<em>any</em>) the content to be loaded. For text formats, can be a str of the content, a file path or a file-like object.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) any extra style-specific keyword arguments.</p></li>
</ul>
</div>
</div>
<div class="section" id="3.-Dump">
<h2>3. Dump<a class="headerlink" href="#3.-Dump" title="Permalink to this headline">¶</a></h2>
<p>Similarly, each style defines its own dump function that can be called with atomman.dump_&lt;style&gt;() or atomman.dump(style). The underlying code for the dump functions can be found in the atomman/dump directory.</p>
<div class="section" id="3.1.-atomman.dump_&lt;style&gt;()">
<h3>3.1. atomman.dump_&lt;style&gt;()<a class="headerlink" href="#3.1.-atomman.dump_<style>()" title="Permalink to this headline">¶</a></h3>
<p>Style-specific dump functions.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>system</strong> (<em>atomman.System</em>) The system to convert.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) any extra style-specific keyword arguments.</p></li>
</ul>
</div>
<div class="section" id="3.2.-atomman.dump()">
<h3>3.2. atomman.dump()<a class="headerlink" href="#3.2.-atomman.dump()" title="Permalink to this headline">¶</a></h3>
<p>Common dump function that can be used for any style.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>style</strong> (<em>str</em>) indicates the format of the content to dump to.</p></li>
<li><p><strong>system</strong> (<em>atomman.System</em>) The system to convert.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) any extra style-specific keyword arguments.</p></li>
</ul>
</div>
<div class="section" id="3.3.-System.dump()">
<h3>3.3. System.dump()<a class="headerlink" href="#3.3.-System.dump()" title="Permalink to this headline">¶</a></h3>
<p>The System class also defines a dump() method that calls atomman.dump() on itself.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>style</strong> (<em>str</em>) indicates the format of the content to dump to.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) any extra style-specific keyword arguments.</p></li>
</ul>
</div>
</div>
<div class="section" id="4.-Supported-styles">
<h2>4. Supported styles<a class="headerlink" href="#4.-Supported-styles" title="Permalink to this headline">¶</a></h2>
<p>This is the list of currently supported styles and links to more in-depth discussion of each.</p>
<p><a class="reference external" href="1.4.1._system_model_conversions.html">system_model</a> The JSON/XML data model designed for representing all data associated with an atomman.System object.</p>
<p><a class="reference external" href="1.4.2._POSCAR_conversions.html">poscar</a> POSCAR is a common text format used by VASP and other DFT-centric codes.</p>
<p><a class="reference external" href="1.4.3._CIF_conversions.html">cif</a> CIF is a standard format for representing crystallographic data.</p>
<p><a class="reference external" href="1.4.4._table_conversions.html">table</a></p>
<p><a class="reference external" href="1.4.5._LAMMPS_data_file_conversions.html">atom_data</a> LAMMPS data files used to define initial atomic data.</p>
<p><a class="reference external" href="1.4.6._LAMMPS_dump_file_conversions.html">atom_dump</a> LAMMPS dump files used to retrieve computed atomic properties.</p>
<p><a class="reference external" href="1.4.7._ase_and_phonopy_conversions.html">ase_Atoms, phonopy_Atoms</a> The Python class representation of atomic systems used by the <a class="reference external" href="https://wiki.fysik.dtu.dk/ase/">ase</a> and <a class="reference external" href="https://atztogo.github.io/phonopy/">phonopy</a> Python packages.</p>
<p><a class="reference external" href="1.4.8._pymatgen_conversions.html">pymatgen_Structure</a> The Python class representation of atomic systems used by the <a class="reference external" href="http://pymatgen.org/">pymatgen</a> Python package.</p>
<p><a class="reference external" href="1.4.9._spglib_conversions.html">spglib_cell</a> The atomic data used by the <a class="reference external" href="https://atztogo.github.io/spglib/python-spglib.html">spglib</a> Python package for analyzing space group information.</p>
<p><a class="reference external" href="1.4.10._prototype_loading.html">prototype</a> A crystal_prototype record found in the NIST Interatomic Potentials Repository database.</p>
<p><a class="reference external" href="1.4.11._crystal_loading.html">crystal</a> A relaxed_crystal record found in the NIST Interatomic Potentials Repository database. Each relaxed crystal is specific to an interatomic potential.</p>
<p><a class="reference external" href="1.4.12._DFT_reference_crystal_loading.html">dft_reference</a> A reference crystal structure from a DFT database (Materials Project or OQMD).</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Introduction to atomman: Load and dump conversions</a><ul>
<li><a class="reference internal" href="#1.-Introduction">1. Introduction</a></li>
<li><a class="reference internal" href="#2.-Load">2. Load</a><ul>
<li><a class="reference internal" href="#2.1.-atomman.load_&lt;style&gt;()">2.1. atomman.load_&lt;style&gt;()</a></li>
<li><a class="reference internal" href="#2.2.-atomman.load()">2.2. atomman.load()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#3.-Dump">3. Dump</a><ul>
<li><a class="reference internal" href="#3.1.-atomman.dump_&lt;style&gt;()">3.1. atomman.dump_&lt;style&gt;()</a></li>
<li><a class="reference internal" href="#3.2.-atomman.dump()">3.2. atomman.dump()</a></li>
<li><a class="reference internal" href="#3.3.-System.dump()">3.3. System.dump()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#4.-Supported-styles">4. Supported styles</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="1.3._System_class.html"
                        title="previous chapter">Introduction to atomman: System class</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="1.4.1._system_model_conversions.html"
                        title="next chapter">Introduction to atomman: system_model conversions</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="1.4.1._system_model_conversions.html" title="Introduction to atomman: system_model conversions"
             >next</a> |</li>
        <li class="right" >
          <a href="1.3._System_class.html" title="Introduction to atomman: System class"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >Tutorials</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>